import { createStore } from "redux";

// 定义state 初始化 和修改规则
function counterReducer(state = 0, action) {
  console.log(state);
  switch (action.type) {
    case "add":
      return state + 1;
    case "minus":
      return state - 1;
    default:
      break;
  }
}
const store = createStore(counterReducer);
export default store;
